<%@ Page Language="C#" MasterPageFile="~/app-frame.master" AutoEventWireup="true" CodeFile="WidgetDesigner.aspx.cs" Inherits="Default2" Title="Untitled Page" EnableEventValidation="false"%>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
<style type="text/css"> /* Added by 'Imran Gani' on 01-Nov-2012, can be add in themes later */
    #preview{
      position:absolute;
      border:1px solid #ccc;
      background:#333;
      display:none;
      color:#fff;
      box-shadow: 4px 4px 3px rgba(103, 115, 130, 1);
}
</style>

<script type="text/javascript" src="scripts/Widgets.js" language="javascript"></script> <%-- Added by 'Imran Gani' on 01-Nov-2012 --%>

    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
        <tr>
            <td colspan="2">
                <asp:Label ID="lblmessage" runat="server" CssClass="controlFont"></asp:Label></td>
        </tr>
        <tr>
            <td colspan="2">
            <table border="0" cellpadding="0" cellspacing="0" width="100%" runat="server" id="tblbtntop">
                    <tr>
                        <td class="pgForm_title" style="width:33%">
                <asp:Label ID="lblheader" runat="server" Text="Widget Designer"></asp:Label></td>
                        <td class="displaygridbottom" style="width:34%" align="center">
                        <asp:Button ID="btnSaveTop" runat="server" Text="Save" OnClick="btnSaveTop_Click" OnClientClick="javascript:if(validateTextContent()) disableThis('ctl00_ContentPlaceHolder3_btnSave','Saving...'); return false;"    UseSubmitBehavior="false" />
        <asp:Button ID="btnSaveNewTop" runat="server" Text="Save & Next" OnClick="btnSaveNewTop_Click" OnClientClick="javascript:ifvalidateTextContent()) disableThis('ctl00_ContentPlaceHolder3_btnSaveNew','Saving...');" UseSubmitBehavior="false" />
        <asp:Button ID="btnUpdateTop" runat="server" Text="Save" OnClick="btnUpdateTop_Click" OnClientClick="javascript:if(validateTextContent()) disableThis('ctl00_ContentPlaceHolder3_btnUpdate','Saving...'); return false;"    UseSubmitBehavior="false" />
        <asp:Button ID="btnResetTop" runat="server" Text="Reset" OnClick="btnResetTop_Click" CausesValidation="false" UseSubmitBehavior="false" />
                        </td>
                        <td class="pgForm_title" style="width:33%">
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2" id="td_Page_ToopTip" runat="server">
            </td>
        </tr>
        <tr>
            <td colspan="2">
            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                <ContentTemplate>
                    <asp:Panel ID="pnlDesigner" runat="server" Width="100%">
                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%" onload="showicon();">
                        <tr>
                            <td valign="top">
                            <asp:Label ID="Label1" runat="server" Text="Widget Name" CssClass="controlLabelFont"></asp:Label></td>
                            <td valign="top">
                                    <asp:TextBox ID="txtDashboardName" runat="server" CssClass="controlFont" Width="175px" ToolTip="Name of the Widget"></asp:TextBox>
                            <img alt="Required Field" src="Images/star.gif" />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtDashboardName"
                    Display="None" ErrorMessage="This is a required field."></asp:RequiredFieldValidator>
                    <cc1:validatorcalloutextender id="ValidatorCalloutExtender1" runat="server" highlightcssclass="maskInvalid"
                    targetcontrolid="RequiredFieldValidator1" warningiconimageurl="Images/warning_small.gif">
                    </cc1:validatorcalloutextender>
                            </td>
                            <td valign="top">
                            <asp:Label ID="Label11" runat="server" Text="Description" CssClass="controlLabelFont"></asp:Label>
                            </td>
                            <td valign="top">
                            <asp:TextBox ID="txtDescription" runat="server" Height="75px" TextMode="MultiLine" CssClass="controlFont" Width="175px" ToolTip="Description of the Widget"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                            <asp:Label ID="Label2" runat="server" Text="Header" CssClass="controlLabelFont"></asp:Label></td>
                            <td valign="top">
                            <asp:TextBox ID="txtHeader" runat="server" CssClass="controlFont" Width="175px" ToolTip="Text to be displayed in Header section of Widget"></asp:TextBox>
                            <img alt="Required Field" src="Images/star.gif" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtHeader"
                                    Display="None" ErrorMessage="This is a required field."></asp:RequiredFieldValidator>
                                <cc1:validatorcalloutextender id="Validatorcalloutextender3" runat="server" highlightcssclass="maskInvalid"
                    targetcontrolid="RequiredFieldValidator3" warningiconimageurl="Images/warning_small.gif">
                                </cc1:validatorcalloutextender>
                            </td>
                            <td valign="top">
                        <asp:Label ID="lblactive" Text="Active" runat="server" CssClass="controlLabelFont"></asp:Label></td>
                            <td valign="top">
                            <asp:CheckBox ID="chkActive" runat="server" CssClass="controlFont" ToolTip="Active status of the Widget" /></td>
                        </tr>
                        <tr>
                            <td valign="top">
                            <asp:Label ID="Label4" runat="server" Text="Source Type" CssClass="controlLabelFont"></asp:Label></td>
                            <td valign="top">
                            <asp:DropDownList ID="ddlSourceType" runat="server" CssClass="controlFont" Width="175px" AutoPostBack="True" OnSelectedIndexChanged="ddlSourceType_SelectedIndexChanged" ToolTip="Source Type of the Widget">
                            </asp:DropDownList></td>
                            <td valign="top">
                            <asp:Label ID="Label5" runat="server" Text="Source" CssClass="controlLabelFont"></asp:Label></td>
                            <td valign="top" style="white-space:nowrap">
                                <table border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td style="white-space:nowrap">
                            <asp:DropDownList ID="ddlSource" runat="server" AutoPostBack="true" CssClass="controlFont" Width="175px" ToolTip="Source of the Widget" OnSelectedIndexChanged="ddlSource_SelectedIndexChanged">
                            </asp:DropDownList><img alt="Required Field" src="Images/star.gif" /><cc1:validatorcalloutextender id="Validatorcalloutextender2" runat="server" highlightcssclass="maskInvalid"
                    targetcontrolid="RequiredFieldValidator2" warningiconimageurl="Images/warning_small.gif">
                            </cc1:validatorcalloutextender>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ddlSource"
                                Display="None" ErrorMessage="This is a required field."></asp:RequiredFieldValidator></td>
                                        <td align="left" style="white-space:nowrap">
                                                <table><tr><td style="white-space:nowrap">
                                         <asp:ImageButton ID="img_Ordinates"
                                runat="server" ImageAlign="Top" ImageUrl="~/Images/expand3.gif" OnClick="img_Ordinates_Click" CausesValidation="false" AlternateText="Click here to view chart Co-ordinates"/>
                                </td>
                                <td style="white-space:nowrap"><asp:Label ID="lbl_ordinates" runat="server" Text = "XY Axes" Font-Underline="true" CssClass="controlLabelFont"></asp:Label></td>
                                </tr></table>                                
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                        <td colspan="4" align="right">
                            <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">--%>
                                <%--<ContentTemplate>--%>
                                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
                                        <tr>
                                            <td valign="top" align="right">
                                            <asp:Panel ID="td_widget_ordinates" runat="server">
                                            </asp:Panel>
                                            </td>
                                        </tr>
                                    </table>
                <asp:ListBox ID="lst_X_axis" runat="server" Height="1px" Width="8px" style="display:none"></asp:ListBox><asp:ListBox ID="lst_Y_axis" runat="server" Height="1px" Width="8px" style="display:none"></asp:ListBox>
                <%--Height="1px" Width="8px" style="display:none"--%>
                <asp:HiddenField ID="hfAddClick" runat="server" Value="0" />
                <asp:HiddenField ID="hfDelClick" runat="server" />
                <%--Height="1px" Width="8px"--%>
                                <%--</ContentTemplate>--%>
                             <%--   <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="img_Ordinates" EventName="Click" />
                                </Triggers>
                            </asp:UpdatePanel>--%>
                        </td>    
                        </tr>
                        <tr>
                            <td valign="top">
                            <asp:Label ID="Label3" runat="server" Text="Chart Type" CssClass="controlLabelFont"></asp:Label></td>
                            <td valign="top">
                            <table border="0" cellpadding="0" cellspacing="0">
                        <tr>
                        <td valign="top"><asp:DropDownList ID="ddlChartType" runat="server" CssClass="controlFont" Width="175px" ToolTip="Chart Type" AutoPostBack="True" OnSelectedIndexChanged="ddlChartType_SelectedIndexChanged">
                            </asp:DropDownList></td>
                        <td valign="top"><a id="hrefImgTooltip" class="preview" href="" runat="server" onclick="javascript:return false;" onmouseover="javascript:imageOver(this);" onmousemove="javascript:imageMove(this);" onmouseout="javascript:imageOut(this);"> <%-- Added by 'Imran Gani' on 01-Nov-2012, for image preview --%>
                            <img id= "ImgIcon" runat="server" alt="Charts" src="" border="0" /></a>
                            <script language ="javascript" type="text/javascript">showicon();</script></td>
                        </tr>
                        </table>
                            </td>
                            <td valign="top">
                            <asp:Label ID="Label7" runat="server" Text="Show Legend" CssClass="controlLabelFont"></asp:Label></td>
                            <td valign="top">
                            <asp:CheckBox ID="ChkShowLegend" runat="server" CssClass="controlFont" ToolTip="Check this to show legend in widget" /></td>
                        </tr>
                        <tr>
                            <td valign="top">
                            <asp:Label ID="Label8" runat="server" Text="Legend Position" CssClass="controlLabelFont"></asp:Label></td>
                            <td valign="top">
                            <asp:DropDownList ID="ddlLegendPosition" runat="server" CssClass="controlFont" Width="175px" ToolTip="Position of the Legend within the Widget">
                            </asp:DropDownList></td>
                            <td valign="top">
                            <asp:Label ID="Label6" runat="server" Text="Ignore Owner Security" CssClass="controlLabelFont"></asp:Label></td>
                            <td valign="top">
                                <asp:CheckBox ID="ChkIgnoreOwnerSecurity" runat="server" CssClass="controlFont" ToolTip="Checking on this flag, will override the default security and all data in the widget will be displayed" />
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                            <asp:Label ID="lbl_LabelDisplay" runat="server" Text="Label Display" CssClass="controlLabelFont"></asp:Label></td>
                            <td valign="top">
                            <asp:DropDownList ID="ddlLabelDisplay" runat="server" CssClass="controlFont" Width="175px" ToolTip="Position of the label in the Widget" Enabled="false">
                            </asp:DropDownList>
                            <img alt="Help" title="click here to know more about Avoiding duplicates." style="cursor:pointer; vertical-align:bottom;" src="icons/help_on.gif" onclick="document.getElementById('div_help_avoid_dup').style.display = 'block';" />
                                <div id="div_help_avoid_dup" class="defaultFont" style="width:300px; height: 110px; display:none; z-index:1; position:absolute; background-color:White; min-width:200px; padding: 0px 0px 0px 0px; border:solid 1px #000000; overflow:scroll;" >
                                <table style="margin-left:4px;" border='0' cellpadding='1' cellspacing='0'>
                                <tr>
                                    <td align='right'>
                                        <a href='#' style="margin-right:5px;" onclick="javascript:document.getElementById('div_help_avoid_dup').style.display='none';return false;"><img border='0' src='Images/xClose.gif' alt="Close this window" title='Close this window'/></a>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <span style="font-size: 10pt;" class="controlFont"><b>Label Display</b> - Use to specify whether the label should display on top of the chart, outside the chart or does not display. These settings are applicable only for Doughnut and Pie chart.</span>
                                    </td> 
                                </tr>
                                </table>
                                </div>
                                <span id="avoid_duplicates_err" style="vertical-align:text-top; color:Red;" class="controlFont"></span>
                            </td>
                            <td valign="top">
                            <asp:Label ID="lblTextContent" runat="server" Text="Text Content" CssClass="controlLabelFont" Visible="false"></asp:Label></td>
                            <td valign="top">
                            <asp:TextBox ID="txtTextContent" runat="server" CssClass="controlFont" Width="175px" Height="75px" TextMode="MultiLine" Visible="false"></asp:TextBox>&nbsp;<img id="imgTextContentRequired" runat="server" src="images/star.gif" alt="required" visible="false" /></td>
                        </tr>
                        <tr>
                            <td valign="top">
                            <asp:Label ID="Label15" runat="server" Text="Owner" CssClass="controlLabelFont"></asp:Label></td>
                            <td valign="top">
                            <asp:TextBox ID="txtOwner" runat="server" CssClass="controlFont" Width="175px" ToolTip="Owner"></asp:TextBox>
                            <asp:HiddenField ID="hfOwner" runat="server" />
                            <asp:Image ID="imgowner" runat="server" ImageUrl="~/Images/search.gif" CssClass="SearchPopup" ToolTip="Click here for Owner Lookup" />
                            <td valign="top"></td>
                            <td valign="top"></td>
                        </tr>
                        <tr>
                            <td valign="top">
                            <asp:Label ID="Label9" runat="server" Text="Empty Chart Text" CssClass="controlLabelFont" Visible="false"></asp:Label></td>
                            <td valign="top">
                            <asp:TextBox ID="txtEmptyChartText" runat="server" CssClass="controlFont" Width="175px" Height="75px" TextMode="MultiLine" Visible="false"></asp:TextBox></td>
                            <td valign="top">
                            <asp:Label ID="Label10" visible="false" runat="server" Text="Combine small values as Others" CssClass="controlLabelFont"></asp:Label></td>
                            <td valign="top">
                            <asp:CheckBox ID="chkCombineSmallValues" visible="false" runat="server" CssClass="controlFont" /></td>
                        </tr>
                        <tr style="padding-top:5px;">
                        <td class="controlFont" style="font-size: 8pt;" colspan="4">
                Fields marked with (<img src="images/star.gif" alt="required" />) are required.</td>
                        </tr>
                        <tr>
                            <td id="tdcDefaultFields" runat="server" class="controlFont" colspan="4" style="font-size: 8pt;">
                            </td>
                        </tr>
                    </table>
                    <cc1:CollapsiblePanelExtender Collapsed="true" ID="CollapsiblePanelExtender1" runat="server" ExpandDirection="Horizontal" SuppressPostBack="false"
                                                TargetControlID="td_widget_ordinates" Enabled="True" ExpandControlID="img_Ordinates" CollapseControlID="img_Ordinates" CollapsedImage="Images/expand3.gif" ExpandedImage="Images/collapse3.gif" ImageControlID="img_Ordinates">
            </cc1:CollapsiblePanelExtender>
                </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            <asp:Panel ID="PnlPreview" runat="server" Width="100%">
                <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                <tr>
                <td style="height:15px"></td>
                </tr>
                    <tr>
                        <td id="tdPreview" runat="server">
                        </td>
                    </tr>
                </table>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            <table cellpadding="0" cellspacing="0" border="0" width="100%" runat="Server" id="tblbtnbottom">
        <tr>
        <td class="displaygridbottom" style="width:33%"></td>
        <td class="displaygridbottom" style="width:34%" align="center">
        <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" UseSubmitBehavior="True" OnClientClick="javascript:if(validateTextContent()) disableThis('ctl00_ContentPlaceHolder3_btnSave','Saving...');" />
        <asp:Button ID="btnSaveNew" runat="server" Text="Save & Next" OnClick="btnSaveNew_Click" OnClientClick="javascript:if(validateTextContent()) disableThis('ctl00_ContentPlaceHolder3_btnSaveNew','Saving...');" UseSubmitBehavior="false" />
        <asp:Button ID="btnUpdate" runat="server" Text="Save" OnClick="btnUpdate_Click" UseSubmitBehavior="True" OnClientClick="javascript:if(validateTextContent()) disableThis('ctl00_ContentPlaceHolder3_btnUpdate','Saving...');" />
        <asp:Button ID="btnReset" runat="server" Text="Reset" OnClick="btnReset_Click" CausesValidation="false" UseSubmitBehavior="false" />
        </td>
        <td class="displaygridbottom" style="width:33%"></td>
        </tr>
        </table>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            <asp:HiddenField ID="hfafrowid" runat="server" />
            <asp:HiddenField ID="hfcreatedby" runat="server" />
            <asp:HiddenField ID="hfcreatedat" runat="server" />
            <asp:HiddenField ID="hfEventTriggered" runat="server" />
            </td>
        </tr>
    </table>
</asp:Content>

